import 'package:flutter/material.dart';

appBar(String title,{bool showBack = true,List<Widget> actions, PreferredSizeWidget bottom,}){
  return AppBar(
    //明暗模式
    brightness: Brightness.light,
    //显示位置居中
    centerTitle: true,
    //阴影高度
    elevation: 0,
    //背景颜色
    backgroundColor: Colors.white,
    // // 导航栏最左侧Widget：是否显示返回按钮
    leading: showBack?BackButton(color: Colors.black):null,
    // 导航栏右侧List<Widget>
    actions: actions,
    title: Text(
      title,
      style: TextStyle(
        fontSize: 18,
        color: Colors.black,
        fontWeight: FontWeight.bold
      ),
    ),
    bottom: bottom,
  );
}